home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
stazsoftware.com
/
www.stazsoftware.com.tar
/
www.stazsoftware.com
/
futurebasic
/
sample-code
/
functionCounter.sit
/
fnCounter
next >
Wrap
Text File
|
2001-06-15
|
835b
|
43 lines
local fn test1
end fn
/*
local fn test2
end fn
*/
dim h as handle
dim currResFile as short
dim resFile as short
window 1, "STAZ 2000 resource"
currResFile = fn CurResFile
print "currResFile = " currResFile
h = fn Get1Resource( _"STAZ", 2000 )
long if h == 0
print "Resource not found in app's resources"
h = fn GetResource( _"STAZ", 2000 )
long if h == 0
print "Resource not found anywhere"
stop
end if
end if
print
resFile = fn HomeResFile( h )
select resFile
case 0: print "In System file"
case 1: print "In ROM"
case -1: print "Not a resource"
case else: print "In res file " resFile
end select
print "Contents (16 bytes):"
print hex$( [[h]] ), hex$( [[h]+4] ),
print hex$( [[h]+8] ), hex$( [[h]+12] )
// #FNs is coded away like this:
print "Number of local FNs = " {[h] + 2} - [[h] + 8]
do
until fn button